<?php
/* [$WindsForce] (C)Hunzhiwange.COM Since 2014.07.14.
   家居公司发布招标($$)*/

!defined('Q_PATH') && exit;

class Add_C_Controller extends InitController{

	public function index(){
		$oBidding=new JiajubiddingModel();
		
		// 站点属性
		$oBidding->province_id=$GLOBALS['_citysite_']['province_id'];
		$oBidding->city_id=$GLOBALS['_citysite_']['city_id'];
		$oBidding->site_id=$GLOBALS['_citysite_']['site_id'];
		$oBidding->district_id=in_array($GLOBALS['_citysite_']['province_id'],array(1,2,9,22,32,33,34,35))?
			Q::G('city_id'):Q::G('district_id');

		$oBidding->save();
		if($oBidding->isError()){
			$this->E($oBidding->getErrorMessage());
		}else{
			$this->A($oBidding->toArray(),'招标发布成功，请等待网站审核！',1);
		}
	}

}
